package com.yaowk.security.api;

import com.yaowk.security.api.model.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("/auth")
public interface AuthApi {

    @PostMapping("/login")
    void login(String username, String password);

    @PostMapping("/logout")
    void logout();

    @GetMapping("/userInfo")
    User userInfo();

    @GetMapping("/userInfo/{token}")
    User userInfo(@PathVariable String token);

}
